<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="./jquery-3.6.0.js"></script>
</head>

<body>
    <form action="">
        <input type="checkbox" name="check" id="">同意并接受用户协议
        <br>
        <button>提交</button>
    </form>
    <script>
        $('button').click(function () {
            if ($('input').is(':checked') == true) {
                alert("提交成功");
            } else {
                alert("不同意协议，我们将无法为您提供服务")
            }
        })
        console.log($f);
    </script>
</body>

</html>